using Holoville.HOTween;
using Holoville.HOTween.Core;
using UnityEngine;

public class DieMessageInShop : MonoBehaviour
{
	private UILabel message;

	private float alphaPulse;

	private void Awake()
	{
		HOTween.Init();
		message = base.gameObject.GetComponent<UILabel>();
	}

	private void OnEnable()
	{
		message.alpha = 0f;
		alphaPulse = 0f;
		HOTween.Kill(message);
		ShowAwesomeMessageDie();
	}

	private void ShowAwesomeMessageDie()
	{
		HOTween.To(message, 1f, new TweenParms().Prop("alpha", 1f).OnComplete((TweenDelegate.TweenCallback)delegate
		{
			HOTween.To(message, 1f, new TweenParms().Prop("alpha", 0f).OnComplete((TweenDelegate.TweenCallback)delegate
			{
				base.gameObject.SetActive(false);
			}));
		}));
	}

	private void OnDisable()
	{
		HOTween.Kill(message);
		base.gameObject.SetActive(false);
	}
}
